package com.yilong.wei.app.domain;

import java.util.List;

public class Respond {
    private Integer code;
    private String msg; 
    private Integer count;
    private Object data;

    public Respond() {
    }

    public Respond(Integer code, String msg, Integer count, Object data) {
        this.code = code;
        this.msg = msg;
        this.count = count;
        this.data = data;
    }

    public static Respond  OK(Object object){
        Respond respond = new Respond();
        respond.setCode(0);
        respond.setMsg("请求成功.");
        respond.setData(object);
        return respond;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "Respond{" +
                "code='" + code + '\'' +
                ", msg='" + msg + '\'' +
                ", count='" + count + '\'' +
                ", data=" + data +
                '}';
    }
}
